package com.yunyun400.vosk.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 测试控制器，用于验证Spring Boot是否能正确识别和注册Controller组件
 */
@RestController
public class TestController {
    
    private static final Logger logger = LoggerFactory.getLogger(TestController.class);
    
    /**
     * 简单的测试接口
     */
    @GetMapping("/test")
    public String test() {
        logger.info("测试接口被调用");
        return "Hello from Test Controller! Spring Boot is working correctly.";
    }
    
    /**
     * 带路径上下文的测试接口
     */
    @GetMapping("/api/test")
    public String apiTest() {
        logger.info("API测试接口被调用");
        return "API测试成功！Controller已正确注册。";
    }
}